package com.yaowk.system.validator;

import com.jfinal.core.Controller;
import com.yaowk.common.kit.Constant;
import com.yaowk.common.kit.I18nKit;
import com.yaowk.common.validator.BaseValidator;

/**
 * 添加栏目参数验证
 *
 * @authc yaowk
 * 2017/4/20
 */
public class AddColumnValidator extends BaseValidator {
    @Override
    protected void validate(Controller c) {
        String error_msg = I18nKit.get("param_error", Constant.SYSTEM_MODULE, c);
        validateRequiredString("name", ERROR_CODE, error_msg);
        validateInteger("edit_status", ERROR_CODE, error_msg);
        validateInteger("module_id", 1, Integer.MAX_VALUE, ERROR_CODE, error_msg);
    }
}
